﻿<!--
Project: ClipFlair (http://ClipFlair.codeplex.com)
Filename: MediaPlayerOptions.xaml
Version: 20150204
-->

<UserControl x:Class="ClipFlair.Windows.Options.MediaPlayerOptions"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  xmlns:btn="clr-namespace:ImageButtons;assembly=ImageButtons"
  mc:Ignorable="d"
  d:DesignHeight="295" d:DesignWidth="224"
  >

  <UserControl.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/ClipFlair.Windows.Base;component/Themes/Generic.xaml" />
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
  </UserControl.Resources>
  
  <StackPanel Orientation="Vertical">

    <StackPanel.Resources>
      <Style TargetType="StackPanel" BasedOn="{StaticResource PropertyStackPanelStyle}" />
      <Style TargetType="Label" BasedOn="{StaticResource PropertyLabelStyle}" />
    </StackPanel.Resources>

    <StackPanel Orientation="Vertical">
      <Label Content="Media Source:" Target="{Binding ElementName=btnLoadMedia}" />
      
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto" />
          <ColumnDefinition Width="*" />          
          <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
       
        <Label Content="URL:" Target="{Binding ElementName=edMediaURL}" Margin="5,0" Grid.Column="0" />
        <TextBox Name="edMediaURL"
                 Text="{Binding Source, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}"
                 HorizontalScrollBarVisibility="Hidden"
                 AcceptsReturn="False"
                 Grid.Column="1"
                 Margin="0,0,5,0" />

        <btn:ImageButton Name="btnLoadMedia"
                         Image="/ClipFlair.Windows.Media;component/Images/Load.png"
                         ImageHover="/ClipFlair.Windows.Media;component/Images/Load_hover.png"
                         Click="btnLoadMedia_Click"
                         ToolTipService.ToolTip="Open local media file"
                         Grid.Column="2" />

      </Grid>
      
      <StackPanel Orientation="Horizontal" Visibility="Collapsed">
        <Button Name="btnSaveOffline" Content="Store playlist offline" Click="btnSaveOffline_Click" Margin="0,0,5,0" />
        <Button Name="btnLoadOffline" Content="Load playlist previously stored offline" Click="btnLoadOffline_Click" />
      </StackPanel>
      
    </StackPanel>

    <StackPanel Orientation="Vertical">
      <Label Content="Time:" Target="{Binding ElementName=edTime}" />
      <TextBox Name="edTime" Text="{Binding Time, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}" />
    </StackPanel>

    <StackPanel Orientation="Vertical">
      <Label Content="ReplayOffset:" Target="{Binding ElementName=edReplayOffset}" />
      <TextBox Name="edReplayOffset" Text="{Binding ReplayOffset, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}" />
    </StackPanel>

    <StackPanel Orientation="Horizontal">
      <CheckBox Name="cbAutoPlay" IsChecked="{Binding AutoPlay, Mode=TwoWay}" />
      <Label Content="Automatic playback" Target="{Binding ElementName=cbAutoPlay}"/>
    </StackPanel>

    <StackPanel Orientation="Horizontal">
      <CheckBox Name="cbLooping" IsChecked="{Binding Looping, Mode=TwoWay}" />
      <Label Content="Looping" Target="{Binding ElementName=cbLooping}"/>
    </StackPanel>

    <StackPanel Orientation="Vertical" Name="propVolume">
      <Label Content="Volume:" Target="{Binding ElementName=sldVolume}" />
      <!-- <TextBox Name="edVolume" Text="{Binding Volume, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}" /> -->
      <Slider Name="sldVolume" Value="{Binding Volume, Mode=TwoWay}" Minimum="0" Maximum="1" SmallChange="0.05" LargeChange="0.1" Orientation="Horizontal" />
    </StackPanel>

    <StackPanel Orientation="Vertical" Name="propBalance">
      <Label Content="Balance:" Target="{Binding ElementName=sldBalance}" />
      <!-- <TextBox Name="edBalance" Text="{Binding Balance, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}" /> -->
      <Slider Name="sldBalance" Value="{Binding Balance, Mode=TwoWay}" Minimum="-1" Maximum="1" SmallChange="0.05" LargeChange="0.1" Orientation="Horizontal" />
    </StackPanel>

    <StackPanel Orientation="Horizontal">
      <CheckBox Name="cbVideoVisible" IsChecked="{Binding VideoVisible, Mode=TwoWay}" />
      <Label Content="Video visible" Target="{Binding ElementName=cbVideoVisible}"/>
    </StackPanel>

    <StackPanel Orientation="Horizontal">
      <CheckBox Name="cbControlStripVisible" IsChecked="{Binding ControllerVisible, Mode=TwoWay}" />
      <Label Content="Controller visible" Target="{Binding ElementName=cbControlStripVisible}"/>
    </StackPanel>

    <StackPanel Orientation="Horizontal">
      <CheckBox Name="cbCaptionsVisible" IsChecked="{Binding CaptionsVisible, Mode=TwoWay}" />
      <Label Content="Captions visible" Target="{Binding ElementName=cbCaptionsVisible}"/>
    </StackPanel>

  </StackPanel>
  
</UserControl>